package com.anxin.anxin_accident.reportManagement.controller;

import com.anxin.anxin_accident.persistence.model.AccTest;
import com.anxin.anxin_accident.reportManagement.service.AccidentReportManagementService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/accidentReportManagement")
@Tag(name = "accidentReportManagement", description = "事故调查报告管理")
public class AccidentReportManagementController {

    @Resource
    private AccidentReportManagementService accidentReportManagementService;


    @PostMapping("/test")
    @Operation(description = "测试接口")
    @Parameters({
            @Parameter(name = "test", description = "测试"),
    })
    public IPage<AccTest> query(@RequestParam(name = "test", required = false) String test) {

        return accidentReportManagementService.test(test);
    }


}
